package com.qef.com.mmovie.presenter;

import com.qef.com.mmovie.entity.User;
import com.qef.com.mmovie.mvp.interactor.CollectionIneractor;
import com.qef.com.mmovie.net.IGetDataDelegate;
import com.qef.com.mmovie.presenter.contract.CollectionContract;

import java.util.List;

import javax.inject.Inject;

/**
 * 2016 逛街购（北京）网络科技有限公司，版权所有
 * guangjiegou - Android客户端
 * Context:收藏页面presenter
 * Created by fanenqian on 2017/6/8 17:43
 */

public class CollectionPresenter extends RxPresenter<CollectionContract.View> implements CollectionContract.PerSenter {
    @Inject
    CollectionIneractor ineractor;

    @Inject
    public CollectionPresenter() {
    }

    @Override
    public void getData(int page) {
        ineractor.getCollectionData(page, User.getCurrenUser().getUsername(), new IGetDataDelegate<List>() {
            @Override
            public void getDataSuccess(List list) {
                mView.showContent(list);
            }

            @Override
            public void getDataError(Throwable throwable) {

            }
        });

    }
}
